home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #4
/
Amiga Plus CD - 1996 - No. 4.iso
/
pd
/
daten
/
flm_v2.17
/
otherfiles
/
english
/
arexx
/
flmtest.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-02-05
|
1KB
|
72 lines
/*
Script which proves FLM capabilites for automatic translation.
This script translates 10 times the next two character strings, and
then ends: This way the first character string is 'deutsch', and the
second one is 'englisch'.
*/
zeichenfolge1='Das ist ein großer Wörterbuch - Test ...'
zeichenfolge2='This is a large dictionary test ...'
options results
address FLM
do k=1 to 10 /* Fake endless loop */
setlanguage deutsch
do i=1 to words(zeichenfolge1) /* tue solange Wörter im String */
wort = word(zeichenfolge1,i) /* 1., 2., 3. ... Wort */
say "Suche" wort
lookword wort
found /* gefunden ? */
if result = 0 then
do
wordanz
anz=RESULT
say anz "Wörter wurden gefunden"
do j=1 to anz
takeword j /* Übersetzungen holen */
say RESULT
end
end
else
do
say "Wort steht nicht im Wörterbuch"
takefound
say "Nächtsähnlichstes Wort ist" RESULT
end
say
end
setlanguage englisch
do i=1 to words(zeichenfolge2) /* do as long as there are words in string */
wort = word(zeichenfolge2,i) /* 1., 2., 3. ... word */
say "Searching" wort
lookword wort
found /* Found? */
if result = 0 then
do
wordanz
anz=RESULT
say anz "Words were found"
do j=1 to anz
takeword j /* Take translations */
say RESULT
end
end
else
do
say "Word is not in dictionary"
takefound
say "Next similar word is" RESULT
end
say
end
end
exit /* Script ends */